package indi.zhifa.study2024.nbr.monitor.controller;

import indi.zhifa.core.common.web.entity.ann.ZhiFaRestController;
import indi.zhifa.study2024.nbr.monitor.logic.curd.login.service.ILoginService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Slf4j
@Validated
@RequiredArgsConstructor
@RequestMapping(value = "/nbr/monitor/test")
@ZhiFaRestController
@Tag(name = "测试接口")
public class TestController {
    private final ILoginService mLoginService;

    @Operation(summary = "获取权限数据base64串")
    @GetMapping(value = "/getAuthBase64",produces = "text/html")
    public String decodeTokenToAuthStr(@RequestParam(name = "token") String pToken){
        return mLoginService.decodeTokenToAuthStr(pToken);
    }
}
